//
//  SWDateUtil.m
//  SWIOSLibary
//
//  Created by shaowei on 13-8-1.
//  Copyright (c) 2013年 LianZhan. All rights reserved.
//

#import "SWDateUtil.h"

@implementation SWDateUtil

static NSDateFormatter *sDateFormatter = nil;
//[dateFormatter setDateFormat:@"yyyy-MM-dd 'at' HH:mm"]; formattedDateString: 2001-01-02 at 13:00
+ (NSString *)handleDate:(double)date format:(NSString *)format{
    if (!sDateFormatter) {
        sDateFormatter = [[NSDateFormatter alloc] init];
        [sDateFormatter setDateFormat:format];
        
    }
    
    return [sDateFormatter stringFromDate:[NSDate dateWithTimeIntervalSince1970:date]];
}

@end
